﻿<div id="content">
    <!--<div class="row">
        <big-breadcrumbs items="['权限管理', '权限编辑']" icon="home" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></big-breadcrumbs>
        &lt;!&ndash; <div smart-include="app/layout/partials/sub-header.tpl.html"></div> &ndash;&gt;
    </div>-->
    <!-- widget grid -->
    <section id="widget-grid" widget-grid>
        <!-- start row -->
        <div class="row">
            <h1 class="margin-bottom-30 margin-top-0 clearfix">
                <div class="col-sm-2">
                    <select class="form-control" id="sel" ng-model="role_id" ng-change="sel()">
                        <option class="role" value="">选择角色</option>
                        <option class="role" ng-repeat="list in roles" value="{{list.id}}">{{list.name}}</option>
                    </select>
                </div>
            </h1>
           
            <article class="col-sm-12 col-md-12 col-lg-12 ">
                <!-- Widget ID (each widget will need unique ID)-->
                <div data-widget-editbutton="false " data-widget-color="darken " data-widget-deletebutton="false " data-jarvis-widget>
                    <!-- widget options:
                    usage: <div data-jarvis-widget id="wid-id-0 " data-widget-editbutton="false ">
                    data-widget-colorbutton="false "
                    data-widget-editbutton="false "
                    data-widget-togglebutton="false "
                    data-widget-deletebutton="true "
                    data-widget-fullscreenbutton="false "
                    data-widget-custombutton="false "
                    data-widget-collapsed="true "
                    data-widget-sortable="false "
                    -->
                    <header>
                        <span class="widget-icon "> <i class="fa fa-lg fa-pencil-square-o "></i> </span>
                        <h2>编辑动作权限</h2>
                    </header>
                    <!-- widget div-->
                    <div role="content">
                        <!-- widget content -->
                        <div class="widget-body ">
                            <form class="smart-form ng-pristine ng-valid ">
                                <div class="table-responsive" style="margin-bottom:20px;">
                                    <table class="table table-bordered table-responsive table-hover son">
                                        <thead>
                                            <th class="text-center">项目名称</th>
                                            <th class="text-center" ng-repeat="action in actions">{{action.name}}</th>
                                        </thead>
                                        <tbody>
                                            <tr ng-repeat="pro in projects" class="text-center">
                                                <td>{{pro.name}}</td>
                                                <td ng-repeat="action in actions">
                                                    <label class="checkbox-inline">
                                                        <input type="checkbox" class="checkbox style-0 one" id="{{action.action_id}}-{{pro.id}}">
                                                        <span></span>
                                                    </label>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </form>
                            <div class="widget-footer">
                                <div class="col-xs-6 col-sm-4 col-md-4 ng-scope">
                                    <label class="checkbox-inline" id="parent">
                                        <input type="checkbox" class="checkbox style-0" id="all">
                                        <span>全选</span>
                                    </label>
                                </div>
                                <button class="btn btn-sm btn-primary" type="button" ng-click="addactMenu()">提交</button>
                            </div>
                        </div>

                        
                    </div>
                    <!-- end widget content -->
                </div>
                <!-- end widget div -->
                <!-- end widget -->
            </article>

        </div>
        <!-- end row -->

    </section>

</div>
<div class="modal fade" tabindex="-1" role="dialog" id="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title"><i class="fa fa-warning"></i>提示：</h4>
        </div>
        <div class="modal-body">
            <p>未选择角色，请选择正确的角色！</p>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
